<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Register</title>
<?php
include ("dbConfig.php");
?>

<style type="text/css">
	p {
		font-family: "BankGothic Lt BT", Geneva;
		font-size: 24px;
		color: #FFF;
	}
	
	p1 {
		font-family: "BankGothic Lt BT", Geneva;
		font-size: 14px;
		color: #FFF;
	}
	</style>
    
</head>
<body bgcolor="#000000">
<p>Redirecting you</p>
<p1>please wait..</p1>

<?php

try {
    $sql = "INSERT INTO USERS" .
	"(userName, password, firstName, lastName, email)".
	" VALUES ('".$_POST[txtRegUsername]."','".$_POST[txtRegPassword]
	."','".$_POST[txtRegFirstName]."','".$_POST[txtRegLastName]."','"
	.$_POST[txtRegEmail]."')";
	
    $sth = $dbhandle->query($sql);
	?>
    <script type="text/javascript">
	alert("Thank you for registering with us!")
	window.location.href='http://manning3.jcu.edu.au/~jc192699/index.php';
	</script>
<?php
	
	} 
	catch(PDOException $e) {
    	echo $e->getMessage();
						}
?>

</body>
</html>